package com.mtgdeckbuilder.server;

import java.io.IOException;
import java.util.List;

import com.mtgdeckbuilder.shared.dto.CardDTO;

/**
 * The abstract class that represents a source of information for Magic The Gathering cards (websites, databases, ...).
 * 
 * @author Nicolas Deslandes
 */
public abstract class MagicSource {

   /**
    * Query a list of cards with arguments.
    * 
    * @param args the object that contains the arguments of the query.
    * @param limit the limit number of the returned elements.
    * @return the list of found cards.
    * @throws IOException if there was an exception while fetching the card.
    */
   public abstract List<CardDTO> query(CardDTO args, int limit) throws IOException;

}
